package red.mlz.appconsumer.feign.article;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import red.mlz.common.entity.article.Article;

import java.math.BigInteger;
import java.util.List;

@FeignClient(name = "article-service")
public interface ArticleFeign {

    @RequestMapping("/article-service/getArticleList")
    List<Article> getArticleList (@RequestParam(name = "page") int page,
                                         @RequestParam(name = "pageSize") int pageSize,
                                         @RequestParam(name = "key")String key);

    @RequestMapping("/article-service/getById")
    Article getById(@RequestParam(name = "articleId") BigInteger articleId);
}
